﻿{extend name="common/header_user"}
{block name="body"}
<div class="personal">
    <div class="centerBox clearBoth">
        <div class="personal_l">
            <div class="personal_l_a">
                <div class="showimg">
                    <img src="{$userInfo.headimg|default='__ROOT__/home/images/yhm.png'}" alt="">
                </div>
                <h3>{$userInfo.nickname}</h3>
            </div>
            {include file="common/left_menu" /}
        </div>
        <div class="personal_r">
            <div class="main_name">
                个人信息
            </div>
            <form class="personal_r_nr" onsubmit="return false;" id="authenticationForm" method="post"
                  autocomplete="off" enctype="multipart/form-data">
                <ul>
                    <li>
                        <span style="color: #ff0000;"><b>
                        <!--{if ($userInfo.realname || $userInfo.idcard_no || $userInfo.idcard_front || $userInfo.idcard_front) && $userInfo.auth_type == 0}-->
                            实名认证审核中
                        <!--{elseif ($userInfo.realname || $userInfo.idcard_no || $userInfo.idcard_front || $userInfo.idcard_front) && $userInfo.auth_type == 1}-->
                            实名认证已通过
                        <!--{else}-->
                            您尚未进行实名认证
                        <!--{/if}-->
                        </b></span>
                    </li>
                    <li>
                        <p>真实姓名</p>
                        <div class="per_input">
                            <input type="text" name="realname" value="{$userInfo.realname}"/>
                        </div>
                    </li>
                    <li>
                        <p>身份证号</p>
                        <div class="per_input">
                            <input type="text" name="idcard_no" value="{$userInfo.idcard_no}"/>
                        </div>
                    </li>
                    <li class="layui-form-item layui-row layui-col-space15">
                        {if $userInfo.auth_type == 1}
                            身份证正面
                            <img src="{$userInfo.idcard_front}" style="max-width: 90%;display: block;margin: auto">
                            <br>身份证背面
                            <img src="{$userInfo.idcard_back}" style="max-width: 90%;display: block;margin: auto">
                        {else}

                            <label class="layui-col-xs7 think-form-group-left">
                                    <input name="idcard_front" value='{$userInfo.idcard_front|default=""}' placeholder="请上传身份证正面照片" class="layui-input">
                            </label>
                                <a class="layui-col-xs3 layui-btn think-form-group-right" data-file="btn" data-field="idcard_front" data-type="png,jpg,gif,pdf" style="margin: 7.5px;">
                                    <i class="layui-icon layui-icon-upload"></i> 点击上传
                                </a>
                            </li>
                            <li class="layui-form-item layui-row layui-col-space15">
                            <label class="layui-col-xs7 think-form-group-left">
                                    <input name="idcard_back" value='{$userInfo.idcard_back|default=""}' placeholder="请上传身份证背面照片" class="layui-input">
                            </label>
                                <a class="layui-col-xs3 layui-btn think-form-group-right" data-file="btn" data-field="idcard_back" data-type="png,jpg,gif,pdf" style="margin: 7.5px;">
                                    <i class="layui-icon layui-icon-upload"></i> 点击上传
                                </a>

                        {/if}
                    </li>
                    {if $userInfo.auth_type < 2}
                    <li>
                        <p></p>
                        <div class="per_submit">
                            <input type="hidden" name="id" value="{$userInfo.id}">
                            <input type="submit" id="submitAuthentication" name="submitAuthentication" value="确定">
                        </div>
                    </li>
                    {/if}
                </ul>
            </form>
        </div>
    </div>
</div>
{/block}

{block name='script'}

<script>
    window.form.render();

    {if $userInfo.auth_type == 1}
        $("input").attr('disabled', true);
    {/if}
</script>
{/block}
